WEM Process Monitor


WEM Process Monitor
 
The Process Monitor is a script used for monitoring and maintaining WEM application software processes. It provides the flexibility of being run as a stand-alone program or a fully functional background daemon and is capable of logging to syslog and log file with customizable e-mail notification facilities. The ability to monitor and maintain these processes coupled with the ease and flexibility of this feature’s configuration ensure maximum availability and optimum server performance.
The processes are monitored based on rules defined within a configuration file stored on the server. These rules identify criteria for determining the action to be taken if the conditions are met. (For example, if a process becomes unresponsive, the rule could cause the process to be re-spawned.)
Basic parameters pertaining to the Process Monitor were configured as part of the WEM installation or upgrade process. However, additional parameters are available for fine-tuning its configuration to meet the needs of your network.
note_smallImportant: When installing redundant servers, any WEM services started by the <ems/home>/server/servstart command and monitored by the Process Monitor are not started automatically. Refer to Appendix A for information on installing redundant servers using Oracle Cluster software.
This chapter provides information and procedures for modifying the Process Monitor’s operation using the configuration file.
This chapter includes the following topics:
note_smallImportant: Unless otherwise specified, all information in this chapter applies to both Sun Solaris- and Red Hat Enterprise Linux-based WEM systems.
Process Monitor Configuration File
Processes are monitored based on rules defined within a plain-text configuration file called psmon.cfg located in the /users/ems/server/etc directory (by default).
Rules are defined within the file using the following syntax:
<Process process_id>
   processing-directives directive_variables
</Process>
The following table provides the syntax descriptions.
psmon.cfg Rule Syntax Descriptions
<Process process_id>
processing-directives directive_variables
psmon.cfg Processing Directives
This directive corresponds to the To Email-ID parameter configured during the WEM installation. During the installation, it is stored as a global declaration, however it may also be used in a Process Scope Directive which has precedence over a global declaration.
This directive corresponds to the Poll Interval parameter configured during the WEM installation. During the installation, it is stored as a global declaration, however it may also be used in a Process Scope Directive which has precedence over a global declaration.
This directive corresponds to the SMTP Server Name parameter configured during the WEM installation. During the installation, it is stored as a global declaration, however it may also be used in a Process Scope Directive which has precedence over a global declaration.
Enables the configuration of the sendmail command used for sending e-mail notifications if a failure occurs with the SMTP connection to the host specified by the SMTPHost Directive.
This directive corresponds to the Number of Retries parameter configured during the WEM installation. During the installation, it is stored as a Process Scope Directive for each rule defined for WEM process.
This directive corresponds to the Timeout Interval parameter configured during the WEM installation. During the installation, it is stored as a Process Scope Directive for each rule defined for WEM process.
Default Rules
During installation, WEM provided the user with the opportunity to automatically define rules for the following process monitors:
EMS Server: Enabled by default
Bulkstat Server: Disabled by default
Bulkstat Parser: Enabled by default
Script Server: Disabled by default
Northbound (NB) Server: Disabled by default
Notification Service: Disabled by default
note_smallImportant: Two additional WEM processes are pre-configured to be monitored by the Process Monitor: the Postgres database process and the Apache Webserver process. Configurables for these two processes appear in the psmon.cfg file, but they cannot be altered during the WEM installation process.
The following table identifies the default rules configured for each of the above processes.
Default Rules for WEM Process Monitors Processes
<Process /<ems_dir>/server/bin/server>
spawncmd (cd /<ems_dir>/server; /<ems_dir>/server/bin/server)
pidfile /<ems_dir>/server/server.pid
<Process /<ems_dir>/server/bin/bulkstatserver>
spawncmd (cd /<ems_dir>/server; /<ems_dir>/server/bin/bulkstatserver)
pidfile /<ems_dir>/server/bsserver.pid
<Process /<ems_dir>/server/bin/bulkstatparser>
spawncmd (cd /<ems_dir>/server; /<ems_dir>/server/bin/bulkstatparser)
pidfile /<ems_dir>/server/bulkstatparser.pid
<Process /<ems_dir>/server/bin/scriptsrv>
spawncmd (cd /<ems_dir>/server; /<ems_dir>/server/bin/scriptsrv)
pidfile /<ems_dir>/server/script.pid
<Process /<ems_dir>/server/bin/nbserver>
�spawncmd (cd /<ems_dir>/server; /<ems_dir>/server/bin/nbserver)
pidfile /users/ems/server/nbserver.pid
<Process /<ems_dir>/server/bin/Notify_Service>
spawncmd(cd /<ems_dir>/server; /<ems_dir>/server/bin/nbSrvr
pidfile /<ems_dir>/server/notify_service.pid
<Process /<ems_dir>/postgresx.x.x/bin/postmaster -i>
spawncmd /<ems_dir>/server/scripts/postgresctl start
pidfile /<ems_dir>/postgresx.x.x/data/postmaster.pid
<Process /<ems_dir>/apache/bin/httpd -f /<ems_dir>/apache/conf/httpd.conf>
spawncmd /<ems_dir>/apache/bin/apachectl start
pidfile /<ems_dir>/apache/logs/httpd.pid
Verifying the Process Monitor Status
The status of the Process Monitor can be checked at any time by executing either of the following commands:
ps -ef | grep psmon
or
./serv monitor
The first command indicates whether or not an active psmon process is running. The second command performs one of the following:
Manually Stopping the Process Monitor
Upon installation of the WEM, the Process Monitor is started automatically. This section provides instructions for manually disabling it. This can be useful if changes are made to the configuration file.
Follow the instructions below to manually stop the Process Monitor.
Step 1
Step 2
cd /<ems_dir>/server
Step 3
./serv monitor stop
Step 4
ps -ef | grep psmon
If the Process Monitor was successfully stopped, this command finds no active process and returns no result.
Manually Starting the Process Monitor
Upon installation of the WEM, the Process Monitor is started automatically. However, if the process was stopped, it can be started using the information and instructions in this section.
Step 1
Step 2
cd /<ems_dir>/server
Step 3
./serv monitor start
Once the Process Monitor is started, a status message is displayed. The process identification number assigned to the psmon process, and the directory in which the created log file is located is also displayed.
Running the Process Monitor as a Stand-alone Application
As mentioned previously, the Process Monitor can be run as a background deamon (the default operation when enabled during the installation of the WEM) or a stand-alone application.
This section provides information and instructions for running the Process Monitor as a stand-alone application from the command line interface.
To run the Process Monitor from the command line, use the following instructions:
Step 1
Step 2
cd /<ems_dir>/server
Step 3
./psmon [--conf=filename] [--daemon] [--cron] [--user=user] [--adminemail=emailaddress] [--dryrun] [--help] [--version]
--conf=filename
--adminemail=emailaddress
Depending on the command used, the rules dictated by the configuration file are executed.
 
 

Cisco Systems Inc.
Tel: 408-526-4000
Fax: 408-527-0883